package com.hfzy.ihk.web.ivr.constant;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Created by YANFA on 2018/7/26.
 */
@Component
public class AliyunAkInfo implements InitializingBean{

  //  public static final String profiles = System.getProperty("spring.profiles.active","local");

    public static  String profiles;


    @Value("${spring.profiles.active}")
    public  void setProfiles(String profiles) {
        AliyunAkInfo.profiles = profiles;
    }


   // public  String test;

    //云通信产品-语音API服务产品名称（产品名固定，无需修改）
    public static String product= "Dyvmsapi";
    public static String domain= "dyvmsapi.aliyuncs.com";

    //需要替换成你的AK信息
    public static  String accessKeyId=null;

    public static  String accessKeySecret=null;
    //双呼话单
    public static String  VOICEREPORT =null;

    //中间状态
    public static String  VOICECALLREPORT =null;

    public static String VOICECALLREPORT_QUEUENAME = null;

    public static String VOICECALLREPORT_MESSAGE_TYPE = null;//此处应该替换成相应产品的消息类型

    //ARS
    public static String VOICERTASRREPORT_MESSAGETYPE = null;//此处应该替换成相应产品的消息类型

    public static String VOICERTASRREPORT_QUEUENAME = null;//在云通信页面开通相应业务消息后，就能在页面上获得对应的queueName,每一个消息类型

//   static {
//
//   }


    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("--------------------获取到的环境为："+profiles);
        accessKeyId = "LTAIgapDiAYa1jto";
        accessKeySecret = "iOB8CX685nHPXEhkXi31hrK10tOT0g";
        //双呼话单
        VOICEREPORT = "VoiceReport";

        //中间状态
        VOICECALLREPORT = "VoiceCallReport";

        VOICECALLREPORT_QUEUENAME = "Alicom-Queue-1563532424972749-VoiceCallReport";

        VOICECALLREPORT_MESSAGE_TYPE = "VoiceCallReport";//此处应该替换成相应产品的消息类型

        //ARS
        VOICERTASRREPORT_MESSAGETYPE = "VoiceRTASRReport";//此处应该替换成相应产品的消息类型

        VOICERTASRREPORT_QUEUENAME = "Alicom-Queue-1563532424972749-VoiceRTASRReport";//在云通信页面开通相应业务消息后，就能在页面上获得对应的queueName,每一个消息类型
    }
}
